#ifndef __DATABASE_H__
#define __DATABASE_H__

#include <vector>

#include "unit.h"
#include "subunit.h"
#include "item.h"
#include "image.h"

namespace verema
{

class Database
{
public:
	//Database() {}

	virtual Unit    getUnit(int id) = 0;
	virtual int     putUnit(Unit &unit_) = 0;
	virtual void    getAllUnits(std::vector<Unit> &unit_vector_) = 0;
	virtual void	putAllUnits(std::vector<Unit> &unit_vector_) = 0;
	virtual void	deleteUnit(int id) = 0;

	virtual Subunit getSubunit(int id) = 0;
	virtual int     putSubunit(Subunit &subunit_) = 0;
	virtual void    getAllSubunits(std::vector<Subunit> &subunit_vector_, int unit_id_) = 0;
	virtual void	putAllSubunits(std::vector<Subunit> &subunit_vector_) = 0;
	virtual void	deleteSubunit(int id) = 0;

	virtual Item    getItem(int id) = 0;
	virtual int     putItem(Item &item_) = 0;
	virtual void    getAllItems(std::vector<Item> &item_vector_, int subunit_id_) = 0;
	virtual void    getAllItems(std::vector<Item> &item_vector_, int subunit_id_, bool used_) = 0;
	virtual void	putAllItems(std::vector<Item> &item_vector_) = 0;
	virtual void	deleteItem(int id) = 0;

	virtual Image   getImage(int id) = 0;
	virtual int     putImage(Image &image_) = 0;
	virtual void    deleteImage(int id) = 0;

	virtual ~Database()
	{ }
};

} // namespace verema

#endif // __DATABASE_H__
